~ chicken-core (master) /manual/Deviations from the standard


 1[[tags: manual]]
 2
 3== Confirmed deviations from R7RS
 4
 5=== Number of arguments to procedures and macros
 6
 7The maximal number of arguments that may be passed to a
 8compiled procedure or macro is limited to around 1000.
 9Likewise, the maximum number of values that can be passed
10to continuations captured using {{call-with-current-continuation}}
11is 1000.  This is an implementation restriction that is unlikely
12to be lifted.
13
14
15=== Numeric string-conversion considerations
16
17In some cases the runtime system uses the numerical string-conversion
18routines of the underlying C library.  Consequently, the procedures
19{{string->number}}, {{read}}, {{write}}, and {{display}} do not obey
20read/write invariance for inexact numbers.
21
22
23=== Environments and non-standard syntax
24
25In addition to the standard bindings, {{scheme-report-environment}} and
26{{null-environment}} contain additional non-standard bindings for the
27following syntactic forms: {{import}}, {{require-extension}},
28{{require-library}}, {{begin-for-syntax}}, {{export}}, {{module}},
29{{cond-expand}}, {{syntax}}, {{reexport}}, {{import-for-syntax}}.
30
31=== Assignment to unbound variables
32
33{{set!}} may assign values to unbound variables; this creates a new
34top-level binding for the variable, as if {{define}} had been used
35instead. This extension must be used with care, as typos might cause
36unexpected results:
37
38<enscript highlight="scheme">
39> (let ((frob 5))
40    (set! frov (+ frob 1))  ; oops!
41    frob)
42> 5
43> frov
44> 6
45</enscript>
46
47== Unconfirmed deviations
48
49=== {{char-ready?}}
50
51The procedure {{char-ready?}} always returns {{#t}} for
52terminal ports.
53
54
55
56== Doubtful deviations
57
58== Non-deviations that might surprise you
59
60=== {{let-syntax}} and {{letrec-syntax}}
61
62{{let-syntax}} and {{letrec-syntax}} introduce a new scope.
63
64
65=== {{equal?}} compares all structured data recursively
66
67{{equal?}} compares all structured data with the exception of
68procedures recursively, while R7RS specifies that {{eqv?}} is used for
69data other than pairs, strings and vectors.  However, R7RS does not
70dictate the treatment of data types that are not specified by R7RS
71
72
73---
74Previous: [[Using the compiler]]
75
76Next: [[Extensions to the standard]]
Trap